<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .father{
        height: 440px;
        width: 650px;
        margin: 0 auto;
    }
    img{
        width: 650px;
        height: 440px;
    }
    button{
        position: absolute;
        right: 50%
    }
</style>
<body>
    <div class="father"><img src="C:\Users\zhh2\OneDrive\图片\Image_1707400293885_waifu2x_photo_noise3.png" alt=""></div>
    <button id="btn">点我关闭广告</button>

    <script>
        const fater = document.querySelector('father')
        const btn = document.querySelector('#btn')

        btn.addEventListener('click',function(){
            btn.parentNode.style.display = 'none'
        })
    </script>
</body>
</html>